import axios from 'axios'

const API_BASE_URL = 'http://localhost:8123/api'

// 创建axios实例
axios.create({
  baseURL: API_BASE_URL,
  headers: {
    'Content-Type': 'application/json'
  }
});
// SSE连接函数 - AI恋爱大师
export const connectLoveMasterSSE = (message: string, chatId: string) => {
  const url = `${API_BASE_URL}/ai/love_app/chat/sse?message=${encodeURIComponent(message)}&chatId=${encodeURIComponent(chatId)}`
  return new EventSource(url)
}

// SSE连接函数 - AI超级智能体
export const connectSuperAgentSSE = (message: string) => {
  const url = `${API_BASE_URL}/ai/manus/chat?message=${encodeURIComponent(message)}`
  return new EventSource(url)
}